//
//  NextCell.m
//  B段项目
//
//  Created by 昶博 on 15/9/24.
//  Copyright (c) 2015年 昶博. All rights reserved.
//

#import "NextCell.h"
#import "PrefixHeader.pch"
@implementation NextCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier

{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.datalabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.datalabel];
        self.datalabel.font = [UIFont systemFontOfSize:15];

        self.titleLabel = [[UILabel alloc]init];
        self.titleLabel.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:self.titleLabel];
        self.leftLabel = [[UILabel alloc]init];
        self.leftLabel.font = [UIFont systemFontOfSize:12];

        [self.contentView addSubview:self.leftLabel];
        
        self.peopleCoutImage = [[UIImageView alloc]init];
        [self.contentView addSubview:self.peopleCoutImage];
        self.timeImage = [[UIImageView alloc]init];
        [self.contentView addSubview:self.timeImage];
        self.midLabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.midLabel];
        self.midLabel.font = [UIFont systemFontOfSize:12];
        self.rightLabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.rightLabel];
        self.radioImage = [[UIImageView alloc]init];
        [self.contentView addSubview:self.radioImage];
        
    }
    
    return self;
    
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    
    self.datalabel.frame = CGRectMake(20, 10, 100, 30);
    self.titleLabel.frame = CGRectMake(130, 10, 300, 30);
    self.peopleCoutImage.frame = CGRectMake(20, 52, 16, 16);
    self.leftLabel.frame = CGRectMake(39, 50, 100, 20);
    self.timeImage.frame = CGRectMake(130, 52, 16, 16);
    self.midLabel.frame = CGRectMake(150, 50, 100, 20);
    self.rightLabel.frame = CGRectMake(280, 50, 100, 20);
    self.imageView.frame = CGRectMake(280*w, 40*h, 40*w, 40*h);
    self.imageView.image = [UIImage imageNamed:@"maiqidiantai"];
    
}
-(void)setModel:(ForthModel *)model
{
   
    self.titleLabel.text = model.program_title;
    NSLog(@"####%@",model.program_title);
    self.peopleCoutImage.image = [UIImage imageNamed:@"耳机"];
    self.leftLabel.text = [NSString stringWithFormat:@"%ld",(long)model.program_join_num];
    self.timeImage.image = [UIImage imageNamed:@"time"];
    self.midLabel.text = [NSString stringWithFormat:@"%@",model.program_time_length];
    
      self.datalabel.text= [NSString stringWithFormat:@"%@:",model.program_live_time];
    
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
